import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class Onda here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Onda extends Ninja
{
   private boolean Dir;
   private int cont;
   public Onda(boolean dir){
    Dir = dir;
    cont = 0;
   } 
   
   public void act() 
    {
     if(cont <15)   
        move();
        else
        getWorld().removeObject(this);
    }
    
   private void move(){
    
       if(Dir)
           super.move(10);
        else {
                super.setRotation(180);
                super.move(10);
                 }
       cont ++;
    } 
}
